Depending on the type of product you are using, the definitions of ‘Parameter’, ‘IO Logic’, ‘AxisStatus’, etc. may be different. This example is based on ‘Ezi-SERVO2’, so please apply the appropriate value depending on the product you are using.
Example)
FM_EZISERVO2_PARAM // Parameter enum when using 'Ezi-SERVO2'
FM_EZIMOTIONLINK2_PARAM // Parameter enum when using 'Ezi-MOTIONLINK2'
[EN]
1. Connect a device. 2. Read the Counter Command value. 3. Configure the
Counter Command. 4. Read the modified Counter Command value. 5.
Connection close.
[KR]
1. 장치 연결. 2. Counter Command 값 읽기. 3. Counter Command 설정. 4.
수정 된 Counter Command 값 읽기. 5. 연결 해제.
unsigned char byChannel = 0; //Channel = 0
("---------------------------------- \n");
printf// Set Counter Command Channel Enable
if (FAS_CounterCommand(nBdID, byChannel, CNTCMD_CH_ENABLE, 1) != FMM_OK)
{
("Function(FAS_CounterCommand) was failed.\n");
printf}
.....
[EN]
You can set the Counter Command using the FAS_CounterCommand() function.
Meaning of each argument is as follows sequentially: ‘ID number of the
board’, ‘Channel number’, ‘Counter Command Type’, ‘Value to modify’
[KR]
FAS_CounterCommand() 함수를 사용하여 Counter Command를 설정할 수
있습니다. 해당 함수의 각 인자는 순차적으로 다음을 의미합니다. ‘해당
보드의 ID번호’, ‘채널 번호’, ‘Counter Command Type’, ‘수정할 값’
[EN]
COUNTER_CMD(CNTCMD_CH_ENABLE) is a structure that organizes Counter
Command Types and can be found in the header file (MOTION_DEFINE.h).
[KR]
COUNTER_CMD(CNTCMD_CH_ENABLE)는 Counter Command Type이 정리된 구조체이며
헤더파일 (MOTION_DEFINE.h)에서 확인하실 수 있습니다.
unsigned int dwStatus = 0;
("---------------------------------- \n");
printf// Get Counter Status
if (FAS_GetCounterStatus(nBdID, &dwStatus) != FMM_OK)
{
("Function(FAS_GetCounterStatus) was failed.\n");
printf}
[EN]
You can read the set Counter Command value using the
FAS_GetCounterStatus() function. Meaning of each argument is as follows
sequentially: ‘ID number of the board’, ‘Variable to store the read
value (saved as Bitmask)’
[KR]
FAS_GetCounterStatus() 함수를 사용하여 설정된 Counter Command 값을
읽어올 수 있습니다. 해당 함수의 각 인자는 순차적으로 다음을 의미합니다.
‘해당 보드의 ID번호’, ‘읽어들인 값을 저장할 변수 (Bitmask로 저장됨)’
[EN]
The meaning of Counter Command Bitmask is as follows, with the lower 4
bytes indicating Cnt1 and the upper 4 bytes indicating Cnt2. 0x0001:
Enabled 0x0002: Latch A Enabled 0x0004: Latch B Enabled 0x0008: Z-Phase
Latch Enabled 0x0010: Latch A Latcheds 0x0020: Latch B Latcheds 0x0040:
Z-Phase Latch Latcheds 0x0080: Reset 0x0100: Trigger Status 0x0200:
Comparison For more information, please refer to the header file
(MOTION_DEFINE.h).
[KR]
읽어들인 Counter Command Bitmask는 하위 4Byte는 Cnt1, 상위 4Byte는
Cnt2를 표시하며 다음과 같습니다. 0x0001: Enabled 0x0002: Latch A Enabled
0x0004: Latch B Enabled 0x0008: Z-Phase Latch Enabled 0x0010: Latch A
Latcheds 0x0020: Latch B Latcheds 0x0040: Z-Phase Latch Latcheds 0x0080:
Reset 0x0100: Trigger Status 0x0200: Comparison 자세한 내용은 헤더파일
(MOTION_DEFINE.h)에서 확인하실 수 있습니다.
[EN]
1. Please refer to the [01.ConnectionExam] project document for function
descriptions on connecting and disconnecting devices.
[KR]
1. 장치 연결 및 해제에 대한 함수 설명은 [01.ConnectionExam] 프로젝트
문서를 참고하시기 바랍니다.